//
//  welcomeViewController.m
//  TinyFortune
//
//  Created by lc on 16/7/2.
//  Copyright © 2016年 lc. All rights reserved.
//

#import "welcomeViewController.h"
#import "UIView+LCView.h"
#import "LCTabController.h"
#import "myViewController.h"
#import "DiscoveryViewController.h"
#import "MessageViewController.h"
#import "TinyFortuneViewController.h"

@interface welcomeViewController (){
    UILabel *labelA;
    UILabel *labelB;
    UILabel *labelC;
}

@end

@implementation welcomeViewController

- (void)createUI{
    UIImageView *view = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, LC_WIDTH, LC_HEIGHT)];
    view.image = [UIImage imageNamed:@"IMG_2453.JPG"];
    [self.view addSubview:view];
    //170
    labelA = [[UILabel alloc]initWithFrame:CGRectMake(30, 30, 0, 0)];
    labelA.text = @"与你相遇好幸运," ;
    labelA.numberOfLines = 0;
    labelA.textColor = [UIColor whiteColor];
    [self.view addSubview:labelA];
    
   labelB = [[UILabel alloc]initWithFrame:CGRectMake(50, 100, 0, 0)];
    labelB.text = @"可是我失去为你,";
    labelB.numberOfLines = 0;
    labelB.textColor = [UIColor whiteColor];
    [self.view addSubview:labelB];
    
    labelC = [[UILabel alloc]initWithFrame:CGRectMake(70, 170, 0, 0)];
    labelC.text = @"泪流满面的权利。";
    labelC.numberOfLines = 0 ;
    labelC.textColor = [UIColor whiteColor];
    [self.view addSubview:labelC];
    
}
- (void)viewDidLoad {
    [super viewDidLoad];
    [self createUI];
    
    self.view.window.rootViewController = _tabController;
    
}
- (void)viewDidAppear:(BOOL)animated{
    [super viewDidAppear:animated];
    
   
}
- (void)viewWillAppear:(BOOL)animated{
    [super viewWillAppear:animated];
    [UIView animateWithDuration:2 animations:^{
        labelA.frame = CGRectMake(30, 30, 20, 170);
        // labelA.bounds =CGRectMake(30, 30, 20, 170);
        labelB.frame = CGRectMake(50, 100, 20, 170);
        labelC.frame = CGRectMake(70, 170, 20, 170);
        //labelA.frame.size = CGSizeMake(20, 170);
    } completion:^(BOOL finished) {
        if (finished) {
            //动画效果
            [self.view addTransitionAnimationDurection:1 anitionType:LC_RippleEffect direction:LC_RIGHT];
            
            [self presentViewController:_tabController animated:NO completion:nil];
        }
        
    }];

}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
